An SDN node is generally configured at configuration time, and then at run-time packet traffic is received into the SDN node via one of a number of input ports. The SDN node performs parsing of the packet, to identify various fields. The SDN node then matches against the fields to determine whether the packet matches a particular flow entry. From the matching flow entry, the SDN node then determines what action or actions to take. For example, the action may be to output the packet from a particular output port of the SDN node. Configuration at configuration time generally involves specifying how incoming packets will be parsed, how matching will be performed, and a set of actions that can be taken if a match is detected. For example, the OpenFlow 1.4.0 standard (as set forth by the Open Networking Foundation in “OpenFlow Switch Specification”, version 1.4.0, Oct. 14, 2013, available from www.opennetworking.org) provides a predefined high-level structure for defining data path handling of a packet. Using OpenFlow commands, one or more match tables are set up in the SDN node, and the arrangement of those match tables is specified. In addition, OpenFlow commands are used to specify what the different possible actions are that might be indicated if a match occurs. Using other OpenFlow commands, the match tables can be populated with flow entries. In addition, at run-time once the SDN node is operating and is handling packet traffic, OpenFlow commands can also be communicated to the SDN node, thereby causing the SDN node to insert new flow entries into its match tables, or to delete flow entries from its match tables. The overall setup, and ways that the flow tables can be arranged, is specified by the OpenFlow standard.
The P4 programming language (“Programming Protocol-Independent Packet Processors” domain-specific language, as set forth by the P4 Language Consortium, at www.P4.org) is usable to provide an alternative to OpenFlow in that a user can use P4 language programming code to define, in a more flexible way, the data plane structure to be employed by the SDN node. For example, P4 is usable to set up a program-defined run-time data path, rather than just a table-based run-time data path as is used in OpenFlow. How the parsing of incoming packets is performed, and how and what the match tables are, and what the actions are and do is expressed in the P4 language. For example, P4 can be used to specify that a packet that matches in a particular way will be traffic-managed in a particular way and will be output from a particular output port of the SDN node. If P4 is employed, then the P4 code that sets up the data plane structure is compiled into native code. The native code is code that can be executed by the processor of the SDN node. The native code is loaded into the SDN node, and the processor then executes the code so as to realize the desired data plane packet handling structure.